<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>全部歌单</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="format-detection" content="telephone=no">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />

<link rel="alternate icon" type="image/png" href="i/favicon1.png">
<link rel="stylesheet" href="css/amazeui.min.css" />

<style>
.get {
	background: #1E5B94;
	color: #fff;
	text-align: center;
	padding: 100px 0;
}

.get-title {
	font-size: 200%;
	border: 2px solid #fff;
	padding: 20px;
	display: inline-block;
}

.get-btn {
	background: #fff;
}

.detail {
	background: #fff;
}

.detail-h2 {
	text-align: center;
	font-size: 150%;
	margin: 40px 0;
}

.detail-h3 {
	color: #1f8dd6;
}

.detail-p {
	color: #7f8c8d;
}

.detail-mb {
	margin-bottom: 30px;
}

.hope {
	background: #0bb59b;
	padding: 50px 0;
}

.hope-img {
	text-align: center;
}

.hope-hr {
	border-color: #149C88;
}

.hope-title {
	font-size: 140%;
}

.about {
	background: #fff;
	padding: 40px 0;
	color: #7f8c8d;
}

.about-color {
	color: #34495e;
}

.about-title {
	font-size: 180%;
	padding: 30px 0 50px 0;
	text-align: center;
}

.footer p {
	color: #7f8c8d;
	margin: 0;
	padding: 15px 0;
	text-align: center;
	background: #2d3e50;
}
</style>
</head>
<body>
	<s:set name="username" value="#session['username']" />
	<header class="am-topbar">
	<h1 class="am-topbar-brand">
		<i class="am-icon-modx am-icon-sm"></i>
		<s:a href="index">Wonderful Song</s:a>
	</h1>

	<button
		class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-secondary am-show-sm-only"
		data-am-collapse="{target: '#collapse-head'}">
		<span class="am-sr-only">导航切换</span> <span class="am-icon-bars"></span>
	</button>



	<div class="am-collapse am-topbar-collapse" id="collapse-head">
		<ul class="am-nav am-nav-pills am-topbar-nav">
			<li><s:a href="index">
					<span class="am-icon-home"></span>  首页</s:a></li>
			<li class="am-active"><s:if test="#username != null">
					<s:a
						href="masonry?username=%{#username.username}&
image=%{#username.image}">
						<span class="am-icon-music"></span>  瀑布流</s:a>
				</s:if> <s:else>
					<s:a href="masonrynologin">
						<span class="am-icon-music"></span>  瀑布流</s:a>
				</s:else></li>

			<s:if test="#username != null">
				<li class="am-dropdown" data-am-dropdown><a
					class="am-dropdown-toggle" data-am-dropdown-toggle
					href="javascript:;"> <span class="am-icon-user"></span> 个人中心 <span
						class="am-icon-caret-down"></span>
				</a>

					<ul class="am-dropdown-content">
						<li><s:a href="admin_user?username=%{#username.username}">个人信息</s:a></li>
						<li><s:a
								href="my_order?username=%{#username.username}&image=%{#username.image}">个人歌单</s:a>
						</li>
					</ul></li>
			</s:if>


		</ul>

		<div class="am-topbar-right">
			<s:if test="#username == null">
				<button onclick="window.location='regist.jsp'"
					class="am-btn am-btn-secondary am-topbar-btn am-btn-sm">
					<span class="am-icon-pencil"></span> 注册
				</button>
			</s:if>
		</div>

		<div class="am-topbar-right">
			<s:if test="#username == null">
				<button onclick="window.location='login.jsp'"
					class="am-btn am-btn-primary am-topbar-btn am-btn-sm">
					<span class="am-icon-user"></span> 登录
				</button>
			</s:if>
		</div>

		<div class="am-topbar-right">
			<s:if test="#username != null">
				<button onclick="window.location='regist.jsp'"
					class="am-btn am-btn-secondary am-topbar-btn am-btn-sm">
					<span class="am-icon-pencil"></span> 注册
				</button>
			</s:if>
		</div>

		<div class="am-topbar-right">
			<s:if test="#username != null">
				<button onclick="window.location='logout.action'"
					class="am-btn am-btn-primary am-topbar-btn am-btn-sm">
					<span class="am-icon-sign-out"></span> 注销
				</button>
			</s:if>
		</div>
		<s:if test="#username != null">
			<div class="am-topbar-right">
				<ul class="am-nav am-nav-pills am-topbar-nav">
					<li><s:a href="#"><img class="am-circle" 
							src="${pageContext.servletContext.contextPath}/img/${username.image}"
							width="40" height="40" /> </s:a></li>
					<li><s:a href="admin_user?username=%{#username.username}">${username.username}</s:a>
					</li>
				</ul>
			</div>
		</s:if>

		<s:form
			action="search?username=%{#username.username}&image=%{#username.image}"
			method="post" theme="simple"
			class="am-topbar-form am-topbar-left am-form-inline am-topbar-right"
			role="search">
			<div class="am-form-group">

				<s:textfield type="text" class="am-form-field am-input-sm" name="s"
					placeholder="请输入歌曲名称" />
				<%-- <s:hidden name="key" value="579621905"></s:hidden>
					<s:hidden name="limit" value="1"></s:hidden>
					<s:hidden name="offset" value="0"></s:hidden>
					<s:hidden name="type" value="song"></s:hidden> --%>
			</div>
			<s:submit value="搜索" type="submit"
				class="am-btn am-btn-default am-btn-sm" />
		</s:form>

	</div>

	</header>
	<!--  导航栏部分结束-->

	<div class="about">
		<div class="am-g am-container">
			<div class="am-u-lg-12">
				<!-- content start -->
				<s:set name="createorder" value="#session['createorder']" />
				<div class="admin-content">
					<div class="admin-content-body">

						<div class="am-cf am-padding am-padding-bottom-0">
							<div class="am-fl am-cf">
								<strong class="am-text-primary am-text-lg">歌单 / </strong> <small><s:property
										value="#createorder.order_title" /></small>
							</div>
						</div>
						<hr />
<s:if test="songcreatelist.size() == 0">
						<div class="am-g">
							<div class="am-u-sm-12 am-u-md-6">
								<div class="am-btn-toolbar">
									<div class="am-btn-group am-btn-group-xs">
										<s:if test="#username != null">
											<s:a cssClass="am-btn am-btn-default"
												href="masonry?username=%{#username.username}&
											image=%{#username.image}">
												<span class="am-icon-music"></span>&nbsp;&nbsp;返回瀑布流</s:a>

											<s:a cssClass="am-btn am-btn-default"
												href="index?username=%{#username.username}&
											image=%{#username.image}">
												<span class="am-icon-home"></span>&nbsp;&nbsp;返回首页</s:a>
										</s:if>
										<s:else>
											<s:a cssClass="am-btn am-btn-default" href="masonrynologin">
												<span class="am-icon-music"></span>&nbsp;&nbsp;返回瀑布流</s:a>
											<s:a cssClass="am-btn am-btn-default"
												href="index?username=%{#username.username}&
											image=%{#username.image}">
												<span class="am-icon-home"></span>&nbsp;&nbsp;返回首页</s:a>
										</s:else>
									</div>
								</div>
							</div>
						</div>
						<div class="am-g">
						<div class="am-u-sm-12">
							<img height="250px" src="img/emopy1.png">
						</div>
					</div>
						
</s:if>
<s:else>
<div class="am-g">
							<div class="am-u-sm-12 am-u-md-6">
								<div class="am-btn-toolbar">
									<div class="am-btn-group am-btn-group-xs">
										<s:if test="#username != null">
											<s:a cssClass="am-btn am-btn-default"
												href="masonry?username=%{#username.username}&
											image=%{#username.image}">
												<span class="am-icon-reply"></span>&nbsp;&nbsp;返回瀑布流</s:a>

											<s:a cssClass="am-btn am-btn-default"
												href="index?username=%{#username.username}&
											image=%{#username.image}">
												<span class="am-icon-reply"></span>&nbsp;&nbsp;返回首页</s:a>
										</s:if>
										<s:else>
											<s:a cssClass="am-btn am-btn-default" href="masonrynologin">
												<span class="am-icon-music"></span>&nbsp;&nbsp;返回瀑布流</s:a>
											<s:a cssClass="am-btn am-btn-default"
												href="index?username=%{#username.username}&
											image=%{#username.image}">
												<span class="am-icon-home"></span>&nbsp;&nbsp;返回首页</s:a>
										</s:else>
									</div>
								</div>
							</div>
						</div>
						<div class="am-g">
							<!-- 内容区域开始 -->
							<div class="am-u-sm-12">

								<form class="am-form">
									<!-- 表格开始 -->
									<table
										class="am-table am-table-striped am-table-hover table-main">
										<thead>
											<tr>
												<th class="table-id">封面</th>
												<th class="table-title">歌曲标题</th>
												<th class="table-type">歌手</th>
												<th class="table-author am-hide-sm-only">专辑</th>
												<th class="table-date am-hide-sm-only">播放</th>
												<th class="table-date am-hide-sm-only">收藏</th>
											</tr>
										</thead>
										<tbody>
											<s:iterator value="songcreatelist" var="songcreate">
												<tr>
													<td><img
														src="${pageContext.servletContext.contextPath}/img/${img}"
														width="120px"></td>
													<td><s:property value="#songcreate.title" /></td>
													<td><s:property value="#songcreate.singer" /></td>
													<td class="am-hide-sm-only"><s:property
															value="#songcreate.cd" /></td>
													<td class="am-hide-sm-only"><audio controls> <source
															src="${pageContext.servletContext.contextPath}/img/${playurl}">
														您的浏览器不支持 audio 元素。 </audio></td>
													<td><s:if test="#username != null">
															<s:if test="!songbelonglist.contains(#songcreate.id)">
																<s:a
																	href="storesong?username=%{#username.username}&
								image=%{#username.image}&
								songid=%{#songcreate.id}&
								orderId=%{#createorder.id}&
								pageNum_sc=%{pageNum_sc}&
								ordertitle=%{#createorder.order_title}
								">
																	<span
																		class="am-btn am-btn-secondary am-topbar-btn am-btn-sm"><span
																		class="am-icon-archive"></span>&nbsp;&nbsp;收藏我</span>
																</s:a>
															</s:if>
															<s:elseif
																test="#songcreate.song_creater == #username.username">
																<span
																	class="am-btn am-btn-warning am-topbar-btn am-btn-sm"><i
																	class="am-icon-check"></i>&nbsp;&nbsp;由我创建</span>
															</s:elseif>
															<s:else>
																<span
																	class="am-btn am-btn-success am-topbar-btn am-btn-sm"><i
																	class="am-icon-check"></i>&nbsp;&nbsp;已收藏</span>
															</s:else>
														</s:if> <s:else>
															<s:a href="storesong">
																<span
																	class="am-btn am-btn-secondary am-topbar-btn am-btn-sm"><span
																	class="am-icon-archive"></span>&nbsp;&nbsp;收藏我</span>
															</s:a>
														</s:else></td>
												</tr>

											</s:iterator>
										</tbody>
									</table>


									<div class="am-fr">
										<!-- 分页开始 -->
										<ul class="am-pagination">
											<li><a>${pageNum_sc}&nbsp;/&nbsp;${totalpage_sc}</a></li>

											<li><s:url var="firstpage_sc"
													action="querymasonryorder?
						username=%{#username.username}&
						image=%{#username.image}&
						orderId=%{#createorder.id}&
						ordertitle=%{#createorder.order_title}">
													<s:param name="pageNum_sc">1</s:param>
												</s:url> <s:a href="%{firstpage_sc}">
													<span class="am-icon-hand-o-left"></span>
												</s:a></li>

											<li><s:if test="pageNum_sc!=1">
													<s:url var="prePage_sc"
														action="querymasonryorder?
						username=%{#username.username}&
						image=%{#username.image}&
						orderId=%{#createorder.id}&
						ordertitle=%{#createorder.order_title}">
														<s:param name="pageNum_sc">
															<s:property value="pageNum_sc-1" />
														</s:param>
													</s:url>
													<s:a href="%{prePage_sc}">
														<span class="am-icon-arrow-left"></span>
													</s:a>
												</s:if></li>
											<s:if test="pageNum_sc!=totalpage_sc">
												<li><s:url var="nextPage_sc"
														action="querymasonryorder?
				username=%{#username.username}&
				image=%{#username.image}&
				orderId=%{#createorder.id}&
				ordertitle=%{#createorder.order_title}">
														<s:param name="pageNum_sc">
															<s:property value="pageNum_sc+1" />
														</s:param>
													</s:url> <s:a href="%{nextPage_sc}">
														<span class="am-icon-arrow-right"></span>
													</s:a></li>
											</s:if>
											<li><s:url var="lastPage_sc"
													action="querymasonryorder?
		username=%{#username.username}&
		image=%{#username.image}&
		orderId=%{#createorder.id}&
		ordertitle=%{#createorder.order_title}">
													<s:param name="pageNum_sc">
														<s:property value="totalpage_sc" />
													</s:param>
												</s:url> <s:a href="%{lastPage_sc}">
													<span class="am-icon-hand-o-right"></span>
												</s:a></li>
										</ul>
									</div>
									<!-- 分页结束 -->


									<hr />
								</form>
								<!-- 表格结束 -->

							</div>

						</div>
						</s:else>
						<!-- 内容区域结束 -->

					</div>

					<footer data-am-widget="footer" class="am-footer am-footer-default"
						data-am-footer="{  }">
					<div class="am-footer-switch">
						<span class="am-footer-ysp" data-rel="mobile"
							data-am-modal="{target: '#am-switch-mode'}"> Wonderful
							Song </span> <span class="am-footer-divider"> | </span> <span
							class="am-footer-ysp" data-rel="mobile"
							data-am-modal="{target: '#am-switch-mode'}"> 打造你的个性歌单 </span>

					</div>
					<div class="am-footer-miscs ">

						<p>王骏&nbsp;&nbsp;毕业设计作品</p>
						<p>CopyRight©2019 15软件G1班</p>
						<p>2015330117</p>
					</div>
					</footer>


				</div>
			</div>
		</div>
	</div>
	<!-- content end -->

	<script src="js/jquery.min.js"></script>
	<script src="js/amazeui.min.js"></script>
	<script src="js/masonry.pkgd.js"></script>
	<script src="js/masonry.pkgd.min.js"></script>



</body>
</html>